// pages/shipu/shipu.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    types:[
     {id:"1", name:"春季护肝",
     color:"#709573",
     food:[
      {fid:"1",fname:"菠菜",fimage:"/assets/season/spring/1.png"},
      {fid:"2",fname:"香椿",fimage:"/assets/season/spring/2.png"},
      {fid:"3",fname:"韭菜",fimage:"/assets/season/spring/3.png"},
        {fid:"4",fname:"芹菜",fimage:"/assets/season/spring/4.png"},
        {fid:"5",fname:"白菜",fimage:"/assets/season/spring/5.png"},
        {fid:"6",fname:"豆芽",fimage:"/assets/season/spring/6.png"},
        {fid:"7",fname:"生姜",fimage:"/assets/season/spring/7.png"},
        {fid:"8",fname:"西兰花",fimage:"/assets/season/spring/8.png"}
     ]},
     {id:"2",
      name:"夏季养心",
      color:"#AA3E37",
      food:[
        {fid:"1",fname:"山楂",fimage:"/assets/season/summer/1.png"},
      {fid:"2",fname:"红枣",fimage:"/assets/season/summer/2.png"},
      {fid:"3",fname:"草莓",fimage:"/assets/season/summer/3.png"},
      {fid:"4",fname:"西瓜",fimage:"/assets/season/summer/4.png"},
      {fid:"5",fname:"苹果",fimage:"/assets/season/summer/5.png"},
      {fid:"6",fname:"桃子",fimage:"/assets/season/summer/6.png"},
      {fid:"7",fname:"绿豆",fimage:"/assets/season/summer/7.png"},
      {fid:"8",fname:"西红柿",fimage:"/assets/season/summer/8.png"},
       ]},
     {id:"3", name:"秋季润肺",color:"#BA9A61", food:[
      {fid:"1",fname:"莲藕",fimage:"/assets/season/autumn/1.png"},
    {fid:"2",fname:"梨子",fimage:"/assets/season/autumn/2.png"},
    {fid:"3",fname:"燕窝",fimage:"/assets/season/autumn/3.png"},
    {fid:"4",fname:"百合",fimage:"/assets/season/autumn/4.png"},
    {fid:"5",fname:"莲子",fimage:"/assets/season/autumn/5.png"},
    {fid:"6",fname:"银耳",fimage:"/assets/season/autumn/6.png"},
    {fid:"7",fname:"山药",fimage:"/assets/season/autumn/7.png"},
    {fid:"8",fname:"白萝卜",fimage:"/assets/season/autumn/8.png"},
     ]},
     {id:"4", name:"冬季补肾",color:"#A17E7D", food:[
      {fid:"1",fname:"黑米",fimage:"/assets/season/winter/1.png"},
    {fid:"2",fname:"黑豆",fimage:"/assets/season/winter/2.png"},
    {fid:"3",fname:"蓝莓",fimage:"/assets/season/winter/3.png"},
    {fid:"4",fname:"黑木耳",fimage:"/assets/season/winter/4.png"},
    {fid:"5",fname:"桑葚",fimage:"/assets/season/winter/5.png"},
    {fid:"6",fname:"板栗",fimage:"/assets/season/winter/6.png"},
    {fid:"7",fname:"黑芝麻",fimage:"/assets/season/winter/7.png"},
    {fid:"8",fname:"黑枸杞",fimage:"/assets/season/winter/8.png"},
     ]},
    ],
   
   
  },
  // onLoad: function () {  
  //   let foods;
  //   if(id=='1')
  //   foods=this.data.cfood;
  //   else if(id=='2')
  //   foods=this.data.xfood;
  //   else foods=[];
  // },
  /**
   * 生命周期函数--监听页面加载
   */
  

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})